<div class="outer-fill shadow padding15">
 <div class="judul-page">Our Service</div>
  <form class="form-inline" role="form" method="post" action="<?php echo site_url($aksi_cari);?>">
    <div class="form-group">
      <label class="sr-only" for="pencarian">Pencarian</label>
      <input type="text" name="judul" class="form-control" value="<?php echo isset($param_judul)?$param_judul:''; ?>" id="judul" placeholder="Pencarian">
    </div>

    <button type="submit" class="btn btn-info btn-sm" id="cari" name="cari">
      <span class="glyphicon glyphicon-search"></span>&nbsp;&nbsp;Cari</button>
    <a href="<?php echo site_url('admin_produk/view_add')?>" class="btn btn-success btn-sm pull-right"> 
      <span class="glyphicon glyphicon-plus"></span>&nbsp;&nbsp;Tambah
    </a>
  </form>
  <br>
    <!-- style table -->
    <table class="table table-striped">
      <thead>
        <tr>
          <th>No</th>
				  <th>Judul</th>
				  <th>Parent Menu</th>
          <th>Menu</th>
  
          <th>Tgl Posting</th>
          
          <th>Aksi</th>
        </tr>
      </thead>
      <tbody>
		  <?php 
		  $no=1+$offset;
		  foreach($hasil as $val){
		  ?>
        <tr>
          <td><?php echo $no?></td>
			    <td><?php echo $val['judul']?></td>
			    <td><?php echo $parent_menu[$val['id_produk']];?></td>
          <td><?php echo $val['nama_menu']?></td>
          <td><?php echo konvert_tgl($val['tgl_posting'])?></td>
          <td>
            <a href="<?php echo site_url('admin_produk/view_edit'."/".$val['id_produk']);?>" class="btn btn-primary btn-xs"><span class="glyphicon glyphicon-edit"></span>&nbsp;Edit</a>
    				<?php
    				
    				if($val['status']=="tidak"){
    				?>
              <a onclick="return confirm('Apakah data ingin dihapus ?')" href="<?php echo site_url('admin_produk/delete'."/".$val['id_produk']);?>" class="btn btn-danger btn-xs"><span class="glyphicon glyphicon-trash"></span>&nbsp;Hapus</a>
            <?php
    				}
    				?>
          </td>
        </tr>
            
      <?php
			$no++;
			}
			?>
      </tbody>
    </table>
    <!-- end table -->

 <?php
echo ! empty($pagination) ? '<center><div class="pagination">' . $pagination . '</div></center>' : '';
?>
</div>